package com.yoga;

import java.util.Scanner;

import com.yoga.view.UserManageView;

public class App {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		UserManageView userManageView = new UserManageView();
		userManageView.showHelpMessage();
		while (scanner.hasNext()) {
			String inputStr = scanner.nextLine();
			String[] params = inputStr.split(" ");
			if(params.length < 1){
				System.out.println("输入不能为空");
			}
			switch(params[0]){
			case "add-member":
				userManageView.addNewUser(params); break;
			case "add-card":
				userManageView.addNewCard(params); break;
			case "help":
			case "-h":
			case "--help":
				userManageView.showHelpMessage(); break;
			default:
				userManageView.errorCmd(); break;
			}
		}
	}
}